import React, { Component, Suspense } from 'react';
import PageHeaderWrapper from '@/components/PageHeaderWrapper';
import { routerRedux } from 'dva/router';
import { connect } from 'dva';
import { Row, Form } from 'antd';
import TempIndex from './index'
import { TableColumn } from './table'
const FormItem = Form.Item;
const titleMap = {
    apicallanalysisColumn: '接口调用情况分析',
    dialogueAnalysisColumn: '对话流程分析',
    knowledgeAnalysisColumn: '知识点数量分析',
    mulDialogueAnalysisColumn: '多轮对话总体情况分析',
    dialogueRateAnalysisColumn: '多轮对话完成率分析',
    dialogueAveAnalysisColumn: '多轮对话平均轮数分析',
    dialogueFailAnalysisColumn: '多轮对话失败原因分析',
    questionAnalysisColumn: '问答任务情况分析',
    unKnownQuestionAnalysisColumn: '未知问题分析',
    unKnownQuestionAggColumn: '未知问题知识点聚合',
}
class AnalysisList extends Component {

    render() {
        const { location } = this.props;
        let pathname = location.pathname.split('/')[2];
        let type = pathname + 'Column';
        return (
            <Row>
                <TempIndex
                    tableColumn={TableColumn[type]}
                    title={titleMap[type]}
                    type = {type}
                ></TempIndex>
            </Row>
        )
    }
}

export default connect(({ user }) => ({
    currentUser: user.currentUser,
}))(Form.create()(AnalysisList));
